home *** CD-ROM | disk | FTP | other *** search
/ Inside Mac Games Volume 4 #9 / IMG 40 Sep 1996.iso / More Goodies / More for Your Game / Marathon 2 / M2 Net Maps / RTM v1.01 / RTM Shapes Editing < prev    next >
Text File  |  1996-06-22  |  4KB  |  53 lines

  1. Notes on editing the M2 textures for Return to Mars v1.01
  2.  
  3. The M2 Shapes file format is similar to M1 or to the M2 preview format, except that the contents of the old .256 resources are now stored in the datafork (see below).  I used a hex editor (HexEdit 1.07) to move the M2 wall1 textures into an .256 resource from the M2 preview.  I then moved this resource into an M1 Shapes file with ResEdit, and pasted the M1 textures into the resource with Pfhred1.3.  Canvas 3.5.3 was used to make the composite switch textures.  Next, I moved the data from the edited resource back into the M2 Shapes file, again using HexEdit.  Cutting and pasting big chunks of the Shapes file with HexEdit requires both patience and a fair amount of memory (does anyone know of a hex editor that allows selection of parts of a large file by specifying beginning and ending offsets?), but it does work.  This rather convoluted method for editing the walls has now been replaced by the M2 Walls Extractor or the M2 Shapes Shuttle.
  4.  
  5. If you want to convert an M1 map to M2 and use this shapes file, note that the RTM textures are from M1 walls2, but they replace M2 texture set1.  Also, a few of the original M1 walls2 textures were omitted, and others were moved to new locations within the texture set.  The easiest way to convert an M1map that uses M1 walls2 is to change the texture set to walls1 in Pfhorte1.0d25 and save the map.  Then open it with Pfhorte2.0 to convert it for M2.  This will set the control panels correctly to set1.  If instead you switch textures from set2 to set1 after opening the map in Pfhorte2.0, you will have to change any control panels to set1 manually, or M2 will crash.
  6.  
  7. M2 Shapes file format:
  8. The first 1024 bytes contain an index to the data sets for each graphics collection.  There are 32 data sets in the normal M2 Shapes file.  Each data set appears to be in the same format as the.256 resources present in the M2 preview (although I have only checked the texture sets).  There are 16 bit versions of some collections, but the format appears to be the same as for the 8-bit collections--with a larger palette.
  9.  
  10. The format for the index is:
  11.  
  12. index entry (32 bytes):
  13.  
  14. First 4 bytes   -unknown, always zero
  15. long                  -offset to data set for 8 bit color (-1 if unused)    
  16. long            -size of data set for 8 bit color   (zero if unused)
  17. long                  -offset to data set for 16 bit color (-1 if none/unused)    
  18. long            -size of data set for 16 bit color   (zero if none/unused)
  19. Last 12 bytes   -unknown, always zero
  20.  
  21.  
  22. Some of the offsets in the normal M2 Shapes file:
  23.  
  24.                                                                           8 bit offset   16 bit offset
  25. set  1                            0400
  26.  
  27. set 18    walls1                45FCA2
  28. set 19 walls2                4DCAE2
  29. set 20 walls3                559922
  30. set 21 walls4 (unused)           -1
  31. set 22 walls5                5D6762
  32.  
  33. set 23 scenery 1             6535A2
  34. set 24 scenery 2
  35. set 25 scenery 3
  36. set 26 scenery 4 (unused)        -1
  37. set 27 scenery 5
  38.  
  39. set 28 landscape1            69A8E8          6BD2E4
  40. set 29 landscape2            7455A0          767F7C
  41. set 30 landscape3            7F0258          812C34
  42. set 31 landscape4            89AF10          8BD8EC
  43.  
  44.  
  45. Textures
  46. The format for the M2 texture collections is the same as for M1 texture collections.  A description of this format can be found in the M1 file specs.  However, you do not need this information to edit the textures, since you can use Pfhred1.3 as described above.
  47.  
  48. Landscapes
  49. These four texture sets contain one texture each (size: 270 x 512).  Since Pfhred 1.3 will not allow new textures to have sizes other than 128 by 128, it is not presently possible to paste in new landscape textures (although Pfhred does display the existing textures correctly).  v1.01 note: MSE will correctly copy and paste textures (at least the 256 color versions), if you want to edit the Landscape textures.  However, the Shape Shuttle and MWE do not presently support replacement of the Landscape sets.
  50.  
  51. Scenery
  52. Scenery sets use sprites.  Scenery includes things like lights and rocks, as well as the splashes for the various medias (scenery 1 for water, scenery 2 for lava, etc).  If the appropriate scenery set is not present when something hits media and causes a splash, M2 will crash.  Which scenery set is loaded is determined by the walls texture set selected (scenery 1 is loaded with walls1, etc).  
  53.